package com.lims.algorithm.useful.annotation.springfacade;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * <功能简述>外观
 * 利用spring，同一个接口的多个类对象自动注入“池”中
 * 使用时调用接口方法，取出对应对象，调用对象方法
 *
 * @author: lims
 * @create: 2019-11-22 11:55
 */
public class ClientMain {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("spring/beans.xml");
        Client client = (Client) context.getBean("client");
        client.print();
    }
}
